/**
 * Copyright (c) 2014, 2017, Oracle and/or its affiliates.
 * The Universal Permissive License (UPL), Version 1.0
 */
"use strict";
/*
 Copyright 2012 Igor Vaynberg

 This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
 General Public License version 2 (the "GPL License"). You may choose either license to govern your
 use of this software only upon the condition that you accept all of the terms of either the Apache
 License or the GPL License.

 You may obtain a copy of the Apache License and the GPL License at:

 http://www.apache.org/licenses/LICENSE-2.0
 http://www.gnu.org/licenses/gpl-2.0.html

 Unless required by applicable law or agreed to in writing, software distributed under the
 Apache License or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 CONDITIONS OF ANY KIND, either express or implied. See the Apache License and the GPL License for
 the specific language governing permissions and limitations under the Apache License and the GPL License.
 Copyright 2012 Igor Vaynberg

 This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
 General Public License version 2 (the "GPL License"). You may choose either license to govern your
 use of this software only upon the condition that you accept all of the terms of either the Apache
 License or the GPL License.

 You may obtain a copy of the Apache License and the GPL License at:

 http://www.apache.org/licenses/LICENSE-2.0
 http://www.gnu.org/licenses/gpl-2.0.html

 Unless required by applicable law or agreed to in writing, software distributed under the
 Apache License or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 CONDITIONS OF ANY KIND, either express or implied. See the Apache License and the GPL License for
 the specific language governing permissions and limitations under the Apache License and the GPL License.
 Copyright 2012 Igor Vaynberg

 This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
 General Public License version 2 (the "GPL License"). You may choose either license to govern your
 use of this software only upon the condition that you accept all of the terms of either the Apache
 License or the GPL License.

 You may obtain a copy of the Apache License and the GPL License at:

 http://www.apache.org/licenses/LICENSE-2.0
 http://www.gnu.org/licenses/gpl-2.0.html

 Unless required by applicable law or agreed to in writing, software distributed under the
 Apache License or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 CONDITIONS OF ANY KIND, either express or implied. See the Apache License and the GPL License for
 the specific language governing permissions and limitations under the Apache License and the GPL License.
 Copyright 2012 Igor Vaynberg

 This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
 General Public License version 2 (the "GPL License"). You may choose either license to govern your
 use of this software only upon the condition that you accept all of the terms of either the Apache
 License or the GPL License.

 You may obtain a copy of the Apache License and the GPL License at:

 http://www.apache.org/licenses/LICENSE-2.0
 http://www.gnu.org/licenses/gpl-2.0.html

 Unless required by applicable law or agreed to in writing, software distributed under the
 Apache License or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 CONDITIONS OF ANY KIND, either express or implied. See the Apache License and the GPL License for
 the specific language governing permissions and limitations under the Apache License and the GPL License.
 Copyright 2012 Igor Vaynberg

 This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
 General Public License version 2 (the "GPL License"). You may choose either license to govern your
 use of this software only upon the condition that you accept all of the terms of either the Apache
 License or the GPL License.

 You may obtain a copy of the Apache License and the GPL License at:

 http://www.apache.org/licenses/LICENSE-2.0
 http://www.gnu.org/licenses/gpl-2.0.html

 Unless required by applicable law or agreed to in writing, software distributed under the
 Apache License or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 CONDITIONS OF ANY KIND, either express or implied. See the Apache License and the GPL License for
 the specific language governing permissions and limitations under the Apache License and the GPL License.
 Copyright 2012 Igor Vaynberg

 This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
 General Public License version 2 (the "GPL License"). You may choose either license to govern your
 use of this software only upon the condition that you accept all of the terms of either the Apache
 License or the GPL License.

 You may obtain a copy of the Apache License and the GPL License at:

 http://www.apache.org/licenses/LICENSE-2.0
 http://www.gnu.org/licenses/gpl-2.0.html

 Unless required by applicable law or agreed to in writing, software distributed under the
 Apache License or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 CONDITIONS OF ANY KIND, either express or implied. See the Apache License and the GPL License for
 the specific language governing permissions and limitations under the Apache License and the GPL License.
 Copyright 2012 Igor Vaynberg

 This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
 General Public License version 2 (the "GPL License"). You may choose either license to govern your
 use of this software only upon the condition that you accept all of the terms of either the Apache
 License or the GPL License.

 You may obtain a copy of the Apache License and the GPL License at:

 http://www.apache.org/licenses/LICENSE-2.0
 http://www.gnu.org/licenses/gpl-2.0.html

 Unless required by applicable law or agreed to in writing, software distributed under the
 Apache License or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 CONDITIONS OF ANY KIND, either express or implied. See the Apache License and the GPL License for
 the specific language governing permissions and limitations under the Apache License and the GPL License.
*/
define(["ojs/ojcore","jquery","ojs/ojeditablevalue"],function(a,g){var b={sB:"oj-select-options-generated",Db:{TAB:9,ENTER:13,QO:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,Z0:16,Xka:17,Qka:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,LO:8,i0:46,rZ:function(a){switch(a.which){case b.Db.Z0:case b.Db.Xka:case b.Db.Qka:return!0}return a.metaKey||a.ctrlKey?!0:!1},vZ:function(a){a=a.which?a.which:a;return 112<=a&&123>=a}},bla:70,Ox:{l0:"enter_pressed",Nla:"option_selected",c0:"blur",Sla:"search_icon_clicked"},
CZ:{x:0,y:0},WA:function(){var a=1;return function(){return a++}}(),Mja:null,br:function(a,b){for(var c=g.isFunction(a[0])?g(a[0]()):g(a[0]),d=-1,e=a.length;++d<e&&(c.context=c[0]=g.isFunction(a[0])?a[d]():a[d])&&!1!==b.call(c[0],d,c););return a},iKa:function(){var a=g("\x3cdiv class\x3d'oj-listbox-measure-scrollbar'\x3e\x3c/div\x3e");a.appendTo("body");var b={width:a.width()-a[0].clientWidth,height:a.height()-a[0].clientHeight};a.remove();return b},Lr:function(a,b){var c,d,e;if(null===a||1>a.length)return[];
c=a.split(b);d=0;for(e=c.length;d<e;d+=1)c[d]=g.trim(c[d]);return c},Tga:function(a){return a.outerWidth(!1)-a.width()},FJa:function(a){a.on("keydown",function(){void 0===g.data(a,"keyup-change-value")&&g.data(a,"keyup-change-value",a.val())});a.on("keyup",function(c){c.which===b.Db.ENTER?c.preventDefault():(c=g.data(a,"keyup-change-value"),void 0!==c&&a.val()!==c&&(g.removeData(a,"keyup-change-value"),a.trigger("keyup-change")))})},EJa:function(a){a.on("mousemove",function(a){var c=b.CZ;if(void 0===
c||c.x!==a.pageX||c.y!==a.pageY)g(a.target).trigger("mousemove-filtered",a),b.CZ.x=a.pageX,b.CZ.y=a.pageY})},ULa:function(a){var b=!1,c;return function(){!1===b&&(c=a(),b=!0);return c}},Xi:function(a){a[0]!==document.activeElement&&window.setTimeout(function(){var b=a[0],c=a.val().length;a.focus();a.is(":visible")&&b===document.activeElement&&(b.setSelectionRange?b.setSelectionRange(c,c):b.createTextRange&&(b=b.createTextRange(),b.collapse(!1),b.select()))},40)},VHa:function(a){a=g(a)[0];var b=0,
c=0;"selectionStart"in a?(b=a.selectionStart,c=a.selectionEnd-b):"selection"in document&&(a.focus(),b=document.selection.createRange(),c=document.selection.createRange().text.length,b.moveStart("character",-a.value.length),b=b.text.length-c);return{offset:b,length:c}},Rw:function(a){a.preventDefault();a.stopPropagation()},XJa:function(a){a.preventDefault();a.stopImmediatePropagation()},GNa:function(a){var b={"\\":"\x26#92;","\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#39;"};
return String(a).replace(/[&<>"'\\]/g,function(a){return b[a]})},$Ja:function(a,c){function d(a){return""+a.label}var e=a,f,h;g.isArray(e)&&(h=e,e={Qb:h});!1===g.isFunction(e)&&(h=e,e=function(){return h});var k=e();k&&k.text&&(d=k.text,g.isFunction(d)||(f=k.text,d=function(a){return a[f]}));return function(a){var f={Qb:[]};""!==a.ku||c?(e()&&b.br(g(e().Qb),function(e,g){b.WV(a,g,f.Qb,c,!0,d)}),a.Mc(f)):a.Mc(e())}},mY:function(a,c,d,e){var f=g("\x3coption\x3e");f.addClass("oj-listbox-result oj-listbox-result-selectable oj-listbox-results-depth-"+
a);f.attr("role","option");f.attr("id","oj-listbox-result-label-"+b.WA());f.text(e(d));f.attr("value",c);return f},xfa:function(a,b,c){var d=g("\x3coptgroup\x3e");d.addClass("oj-listbox-results-sub");d.attr("label",c(b));a.addClass("oj-listbox-result-with-children");return d},ZJa:function(a,c,d){function e(a,c,f){var h,k,l,t;c.each(function(){k=g(this);k.is("li")&&(0<k.children("ul").length?(l=k.contents().filter(function(){return 1!==this.nodeType||"ul"!==this.tagName.toLowerCase()}).text(),h=b.xfa(a,
l,d),t=k.children("ul"),e(h,t.children(),f+1)):h=b.mY(f,k.attr("oj-data-value"),k.text(),d),h.appendTo(a))})}e(a,c,0)},FZ:function(a,b,c){c=b[c]||c;return a[c]},Vea:function(a,c,d,e){function f(a,c,e,g){for(var h,k,p,l=0,t=c.length;l<t;l++)h=c[l],p=b.FZ(h,g,"children"),k=b.FZ(h,g,"label"),p&&0<p.length?(k=b.xfa(a,k,d),f(k,p,e+1,g.childKeys||{})):(p=b.FZ(h,g,"value"),k=b.mY(e,p,k,d)),k.appendTo(a)}f(a,c,0,e||{})},jfa:function(a){a.children().remove();a.removeClass("oj-listbox-result-with-children")},
QKa:function(a,c){return function(d){var e={component:this.V};d.value?e.value=d.value:e.term=d.ku||"";a(e).then(function(a){var e={Qb:[]};a&&b.br(g(a),function(a,f){b.WV(d,f,e.Qb,c,!1)});d.Mc(e)})}},WV:function(a,c,d,e,f,h){var k,w;c=c[0];!c.label&&e&&e.label&&(c.label=c[e.label]);!c.value&&e&&e.value&&(c.value=c[e.value]);!c.children&&e&&e.children&&(c.children=c[e.children],delete c[e.children]);if(c.children){k={};for(w in c)c.hasOwnProperty(w)&&(k[w]=c[w]);k.children=[];b.br(g(c.children),function(c,
d){b.WV(a,d,k.children,e&&e.childKeys?e.childKeys:null,f,h)});(!f||k.children.length||a.Yt(a.ku,h(k),c))&&d.push(k)}else f&&!a.Yt(a.ku,h(c),c)||d.push(c)},GGa:function(a,b,c){if(g.isFunction(b))return!0;if(!b)return!1;throw Error(c+" must be a function or a false value");},xt:function(b,c){function d(){}a.b.sa(d,b,"");d.prototype=g.extend(d.prototype,c);return d},E0:"last-query-result",zga:function(a){return g.data(a.Ha,a.Sa+"-"+b.E0)},pLa:function(a,c){g.data(a.Ha,a.Sa+"-"+b.E0,c)}},c=b.xt(Object,
{te:function(a){var b=this;return function(){a.apply(b,arguments)}},_init:function(a){var c,d,e=this.Sa;c=this.Vd;this.V=a.V;this.ea=a=this.bt(a);this.id=a.id;this.Cha=!1;void 0!==a.element.data(c)&&null!==a.element.data(c)&&a.element.data(c)._destroy();this.Ha=this.KC();var f=a.rootAttributes;this.Wq=f&&f.id?f.id:"ojChoiceId_"+(a.element.attr("id")||"autogen"+b.WA());this.Wq.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1");this.Ha.attr("id",this.Wq);this.body=b.ULa(function(){return a.element.closest("body")});
this.Ha.attr("style",a.element.attr("style"));this.rY=this.ea.element.attr("tabindex");this.ea.element.data(c,this).attr("tabindex","-1").before(this.Ha);this.Ha.data(c,this);this.jd=this.Ha.find(".oj-listbox-drop");this.jd.data("ojlistbox",this);this.bEa(a.pickerAttributes);this.jd.attr("data-oj-containerid",this.Wq);this.Qb=c=this.Ha.find(".oj-listbox-results");this.Qb.on("click",b.Rw);if(f=this.V.j2()){var h=f.attr("id");h?c.attr("aria-labelledby",h):c.attr("aria-label",f.text())}else(f=this.V.element.attr("aria-label"))&&
c.attr("aria-label",f);a.list&&g("#"+a.list).is("ul")&&(c=g("#"+a.list),this.Kfa=c.parent(),c.addClass("oj-listbox-results").attr("role","listbox"),this.Qb.replaceWith(c),this.Qb=c=this.Ha.find(".oj-listbox-results"),this.Qb.css("display",""));this.search=d="oj-select"==e?this.Ha.find("input.oj-listbox-input"):this.Ha.find("input."+e+"-input");this.s_=this.uja=0;this.context=null;this.pK();this.Ha.on("click",b.Rw);b.EJa(this.Qb);this.jd.on("mousemove-filtered touchstart touchmove touchend",".oj-listbox-results",
this.te(this.d$));g(this.Ha).on("change","."+e+"-input",function(a){a.stopPropagation()});g(this.jd).on("change","."+e+"-input",function(a){a.stopPropagation()});var k=this;b.FJa(d);d.on("keyup-change input paste",this.te(this.aF));d.on("focus",function(){d.addClass(e+"-focused");"oj-select"!==e&&k.Ha.addClass("oj-focus")});d.on("blur",function(){d.removeClass(e+"-focused");"oj-select"!==e&&k.Ha.removeClass("oj-focus")});this.jd.on("mouseup",".oj-listbox-results",this.te(function(a){0<g(a.target).closest(".oj-listbox-result-selectable").length&&
(this.d$(a),this.yW(null,a))}));this.jd.on("click mouseup mousedown",function(a){a.stopPropagation()});g.isFunction(this.ea.Ft)&&this.Lv();c=a.element.prop("disabled");void 0===c&&(c=!1);this.bn(!c);c=a.element.prop("readonly");void 0===c&&(c=!1);this.sE(c);b.Mja=b.Mja||b.iKa();this.autofocus=a.element.prop("autofocus");a.element.prop("autofocus",!1);this.autofocus&&this.Xi()},YR:function(a){var b=this.jd;!g(a.target).closest(b).length&&!g(a.target).closest("#"+b.attr("data-oj-containerid")).length&&
0<b.length&&(b=b.data("ojlistbox"),b.close(a))},tw:function(){this.jd&&this.jd.remove()},_destroy:function(){var a=this.xs;isNaN(a)||(delete this.xs,window.clearTimeout(a));var a=this.ea.element,b=a.data(this.Vd);this.close();this.rja&&(delete this.rja,this.rja=null);this.ea.list&&this.Qb&&(this.TR(this.Qb),this.Kfa&&this.Kfa.append(this.Qb));void 0!==b&&(b.Ha.remove(),b.jd.remove(),a.removeAttr("aria-hidden").removeData(this.Vd).off("."+this.Sa).prop("autofocus",this.autofocus||!1),this.rY?a.attr({kOa:this.rY}):
a.removeAttr("tabindex"),a.show())},TR:function(a){if(a&&a.is("ul")){a.removeClass("oj-listbox-results oj-listbox-result-sub");a.removeAttr("role");for(var b=a.children().length-1;0<=b;b--)this.TR(g(a.children()[b]))}else a.is("li")&&((a.hasClass("oj-listbox-placeholder")||a.hasClass("oj-listbox-no-results"))&&a.remove(),a.attr("class")&&a.attr("class",a.attr("class").replace(/\oj-listbox-\S+/g,"")),(b=a.children(".oj-listbox-result-label"))&&b.contents().unwrap(),"none"==a.css("display")&&a.css("display",
""),this.TR(a.children("ul")))},Zv:function(a){if(a.is("option"))return{value:a.prop("value"),label:a.text(),element:a.get(),css:a.attr("class"),disabled:a.prop("disabled"),locked:"locked"===a.attr("locked")||!0===a.data("locked")};if(a.is("optgroup"))return{label:a.attr("label"),children:[],element:a.get(),css:a.attr("class")};if(a.is("li")){var b,c=null;(b=a.children())&&0<b.length&&b.is("ul")?(b=a.attr("oj-data-label")?a.attr("oj-data-label"):a.clone().children().remove().end().text().trim(),c=
[]):b=a.attr("oj-data-label")?a.attr("oj-data-label"):a.text().trim();return{value:a.attr("oj-data-value"),label:b,element:a.get(),css:a.attr("class"),children:c}}},bt:function(a){var c,e,f=this;a.options&&Array.isArray(a.options)&&a.optionsKeys&&(a.options=g.extend(!0,[],a.options));c=a.element;var h=c.get(0).tagName.toLowerCase();"input"===h&&c.attr("list")?this.qp=e=g("#"+c.attr("list")):"select"===h&&0<c.children().length?this.qp=e=c:a.list&&(this.qp=e=g("#"+a.list));a=g.extend({},{BKa:function(c,
d,e,k){var l,q=this.ea.id,m=this.ea.optionRenderer;"function"!==typeof m&&(m=null);l=function(c,d,k,u,y){function s(b,d){if(m){var f={index:M,depth:u,leaf:!d.children,parent:c,data:d,component:a.V,parentElement:b.get(0)},f=m.call(a.V,f);null!==f&&(null===f.parentNode||f.parentNode instanceof DocumentFragment)&&b.get(0).appendChild(f)}else S=a.Xfa(d),void 0!==S&&(b.text(S),b.attr("aria-label",S));!0!==e.iN&&(f=b.find(".oj-listbox-highlighter-section"),f.length||(f=b),v(f,e.ku))}function v(a,b){function c(a,
b){var d=0;if(3===a.nodeType){var e=a.data.toUpperCase().indexOf(b);if(0<=e){d=document.createElement("span");d.className="oj-listbox-highlighter";e=a.splitText(e);e.splitText(b.length);var f=e.cloneNode(!0);d.appendChild(f);e.parentNode.replaceChild(d,e);d=1}}else if(1===a.nodeType&&a.childNodes&&!/(script|style)/i.test(a.tagName))for(e=0;e<a.childNodes.length;++e)e+=c(a.childNodes[e],b);return d}a.length&&b&&b.length&&a.each(function(){c(this,b.toUpperCase())})}function r(a,b){if(b.children&&0<
b.children.length){var c=b.element&&g(b.element[0]).is("li")&&g(b.element[0]).children("ul"),d=c?g(b.element[0]).children("ul"):g("\x3cul\x3e\x3c/ul\x3e");d.hasClass("oj-listbox-result-sub")||d.addClass("oj-listbox-result-sub");l(b,b.children,d,u+1,!1);c||a.append(d)}}var M,H,N,Y,L,S;H=f.Ns();y&&null!==H&&!e.ku&&0>=k.find(".oj-listbox-placeholder").length&&("select"!==h||!f.V.lo())&&(H={value:"",label:H},L=g("\x3cli\x3e\x3c/li\x3e"),L.addClass("oj-listbox-placeholder oj-listbox-results-depth-0 oj-listbox-result oj-listbox-result-selectable"),
L.attr("role","presentation"),N=g(document.createElement("div")),N.addClass("oj-listbox-result-label"),N.attr("id","oj-listbox-result-label-"+b.WA()),N.attr("role","option"),S=a.Xfa(H),void 0!==S&&N.text(S),N.attr("aria-label",S),L.append(N),L.data(f.Vd,H),k.prepend(L));M=0;for(y=d.length;M<y;M+=1){H=d[M];Y=!0===H.disabled;N=!Y&&void 0!==q(H);var F=H.element&&g(H.element[0]).is("li");L=F?g(H.element[0]):g("\x3cli\x3e\x3c/li\x3e");L.hasClass("oj-listbox-result")?(H.children&&0<H.children.length&&r(L,
H),g(H.element[0]).css("display","")):(L.addClass("oj-listbox-results-depth-"+u),L.addClass("oj-listbox-result"),L.addClass(N?"oj-listbox-result-selectable":"oj-listbox-result-unselectable"),Y&&L.addClass("oj-disabled"),H.children&&L.addClass("oj-listbox-result-with-children"),L.attr("role","presentation"),N=g(document.createElement("div")),N.addClass("oj-listbox-result-label"),N.attr("id","oj-listbox-result-label-"+b.WA()),N.attr("role","option"),Y&&N.attr("aria-disabled","true"),F||(s(N,H),L.append(N)),
H.children&&0<H.children.length&&r(L,H),L.data(f.Vd,H),F?(g(H.element[0]).contents().filter(function(){return"UL"!==this.tagName}).wrapAll(N),g(H.element[0]).css("display","")):k.append(L))}};l(null,d,c,0,k)}},d,a);a.id=function(a){return a.value};a.Xfa=function(a){return isNaN(a.label)?a.label:this.V.rv(a.label)};a.DY=function(a){return a&&a.label?isNaN(a.label)?a.label:this.V.rv(a.label):void 0};"select"!==h&&null!==a.manageNewEntry&&(a.manageNewEntry=function(a){var b={};b.value=b.label=g.trim(a);
return b});e?a.hx=this.te(function(a){var c={Qb:[],$Na:!1},d=a.ku,g,h;h=function(c,e){var g,k=c.children()&&0<c.children().length&&c.children().is("ul");if(c.is("option")||c.is("li")&&!k)a.Yt(d,c.text(),c)&&e.push(f.Zv(c));else if(c.is("optgroup")||c.is("li")&&k)g=f.Zv(c),b.br(c.is("optgroup")?c.children():c.children("ul").children(),function(a,b){h(b,g.children)}),0<g.children.length&&e.push(g)};g=e.children();void 0!==this.Ns()&&0<g.length&&""==g.first().attr("value")&&(g=g.slice(1));b.br(g,function(a,
b){h(b,c.Qb)});a.Mc(c)}):"options"in a&&(a.hx=g.isFunction(a.options)?b.QKa(a.options,a.optionsKeys?a.optionsKeys:null):b.$Ja(a.options,a.optionsKeys?a.optionsKeys:null));return a},Tra:function(){var a=this.ea.element.find(".oj-listbox-header");if(a.length){this.header=g("\x3cli\x3e",{"class":"oj-listbox-result-header oj-listbox-result-unselectable",role:"presentation"});this.header.append(a.children());this.Zya();a=g("\x3cul\x3e",{"class":"oj-listbox-results-with-header",role:"listbox"});a.append(this.header);
a.appendTo(this.Qb.parent());var b=g("\x3cli\x3e",{role:"presentation"});a.append(b);this.Qb.attr("role","presentation");this.Qb.appendTo(b)}this.Cha=!0},Zya:function(){this.hl=this.header.find("li[role\x3d'option'], li:not([role])");this.hl.uniqueId();this.header.find("ul").attr("role","presentation");this.header.find("li:not([role])").attr("role","option");this.header.find("a, input, select, textarea, button, object, .oj-component-initnode").each(function(){g(this).attr("tabIndex",-1)})},P$:function(a){var b=
!1;this.hl.each(function(){if(g(this).attr("id")===a)return b=!0,!1});return b},tva:function(a){if(!this.hl)return null;if(!a)return this.hl.first();var b=!1,c=null;this.hl.each(function(){if(b)return c=g(this),!1;b=g(this).attr("id")===a});return c},Gva:function(a){if(!this.hl)return null;var b=null;this.hl.each(function(){if(g(this).attr("id")===a)return!1;b=g(this)});return b},NDa:function(a){var b=a.find(".oj-component .oj-enabled").first();0===b.length&&(b=a.find("a, input, select, textarea, button, object, .oj-component-initnode").first(),
0===b.length&&(b=a.children().first()));b&&b.addClass("oj-focus oj-focus-highlight oj-focus-only")},vCa:function(){this.hl&&this.hl.find(".oj-focus").removeClass("oj-focus oj-focus-highlight oj-focus-only")},tea:function(a){a=g.Event(this.Vd+"-selecting",{val:this.id(a),object:a});this.ea.element.trigger(a);return!a.isDefaultPrevented()},Ro:function(){return!0===this.Lfa},Iy:function(){var a=this.Jy&&!this.sE;if(a===this.Lfa)return!1;this.Ha.toggleClass("oj-disabled",!a);this.close();this.Lfa=a;return!0},
bn:function(a){void 0===a&&(a=!0);this.Jy!==a&&(this.Jy=a,this.ea.element.prop("disabled",!a),this.Ha.toggleClass("oj-enabled",a),this.Iy())},zS:function(){this.bn(!1)},sE:function(a){void 0===a&&(a=!1);if(this.sE===a)return!1;this.sE=a;this.ea.element.prop("readonly",a);this.Iy();return!0},df:function(){return this.Ha.hasClass("oj-listbox-dropdown-open")},Nua:function(){return this.Ha.children().first()},dF:function(b,c){if(a.Ed.pZ(c))this.xs=window.setTimeout(g.proxy(this.close,this),1);else{var d=
this.Ha,e=c.element.element;e.css(b);"bottom"===c.vertical?(d.addClass("oj-listbox-drop-above"),e.addClass("oj-listbox-drop-above")):(d.removeClass("oj-listbox-drop-above"),e.removeClass("oj-listbox-drop-above"))}},M7:function(){var b={my:"start top",at:"start bottom",of:this.Nua(),collision:"flip",using:g.proxy(this.dF,this)},c="rtl"===a.D.In();return a.Ed.ml(b,c)},TV:function(){var a=this.jd,b=this.M7();a.css("width",this.Ha.outerWidth());a.position(b)},zEa:function(a){return this.df()||!1===this.Jy||
!0===this.sE?!1:this.V._trigger("beforeExpand",a,{component:this.ea.element})},o5:function(){this.Ha.removeClass("oj-listbox-drop-above");this.jd.removeClass("oj-listbox-drop-above")},open:function(a,b){if(!this.zEa(a))return!1;this.Yv(a,b);return!0},Yv:function(){this.Cha||this.Tra();this.Ha.addClass("oj-listbox-dropdown-open")},xL:function(){if(this.df()&&"true"!==this.dn().attr("aria-expanded")){this.o5();var b=this.jd.parent();if("oj-select"===this.Sa&&!0!==this.ea.multiple&&b&&b.hasClass("oj-listbox-drop-layer"))a.U.Qe().wO(b,
a.U.Dd.$p);else{this.jd[0]!==this.body().children().last()[0]&&this.jd.detach().appendTo(this.body());this.jd.appendTo(this.body());this.header&&(this.jd.find(".oj-listbox-results-with-header").prepend(this.header),this.header.show());b={};b[a.U.Dd.Ix]=g.proxy(this.close,this);b[a.U.Dd.Jx]=g.proxy(this.tw,this);b[a.U.Dd.Hx]=g.proxy(this.YR,this);b[a.U.Dd.$p]=g.proxy(this.TV,this);var c={};c[a.U.qb.Ih]=this.jd;c[a.U.qb.zB]=this.ea.element;c[a.U.qb.vu]=b;c[a.U.qb.DB]=this.M7();c[a.U.qb.Ur]="oj-listbox-drop-layer";
a.U.Qe().open(c);g("#oj-listbox-drop").removeAttr("id");this.jd.attr("id","oj-listbox-drop");this.jd.attr("data-oj-containerid",this.Wq)}this.TV();this.dn().attr("aria-expanded",!0)}},close:function(){if(this.df()){this.Ha.removeClass("oj-listbox-dropdown-open");var b=this.dn().attr("aria-expanded");if(b&&"false"!==b){var b=this.Wq,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.Ha.parents().add(window).each(function(){g(this).off(c).off(d).off(e)});this.o5();b={};b[a.U.qb.Ih]=this.jd;a.U.Qe().close(b);
this.header&&(this.header.hide(),this.header.appendTo(this.Ha));this.jd.removeAttr("data-oj-containerid");this.jd.removeAttr("id");this.ea.list?this.CE():(this.jd.detach(),this.Qb.empty());this.dn().attr("aria-expanded",!1);"ojcombobox"===this.Vd&&this.dn().removeAttr("aria-activedescendant");g.removeData(this.Ha,this.Sa+"-last-term")}}},bEa:function(b){a.Fe.nO(this.jd,b)},ws:function(){},Bta:function(){var a=this.Qb,b,c,d,e;c=this.Kv();0>c||(0==c?a.scrollTop(0):(b=this.My().find(".oj-listbox-result-label"),
d=g(b[c]),e=d.offset().top+d.outerHeight(!0),c===b.length-1&&(b=a.find("li.oj-listbox-more-results"),0<b.length&&(e=b.offset().top+b.outerHeight(!0))),b=a.offset().top+a.outerHeight(!0),e>b&&a.scrollTop(a.scrollTop()+(e-b)),e=d.offset().top-a.offset().top,0>e&&"none"!=d.css("display")&&a.scrollTop(a.scrollTop()+e)))},My:function(){return this.Qb.find(".oj-listbox-result-selectable:not(.oj-disabled, .oj-selected)").filter(function(){return"none"!=g(this).css("display")})},Kaa:function(a){var b=this.My(),
c=this.Kv();if(this.header&&(0>=c||c===b.length-1)){var d=this.dn().attr("aria-activedescendant"),e=this.P$(d);e||(d=null);var f=null;0<a&&(0>c||c===b.length-1)?f=this.tva(d):0>a&&(e&&0>c||0===c)&&(f=this.Gva(d));if(f){this.CE();this.NDa(f);this.dn().attr("aria-activedescendant",f.attr("id"));return}e&&0>a&&(c=0)}for(;-1<=c&&c<b.length;)if(c+=a,c==b.length?c=0:-1==c&&(c=b.length-1),d=g(b[c]),d.hasClass("oj-listbox-result-selectable")&&!d.hasClass("oj-disabled")&&!d.hasClass("oj-selected")){this.Kv(c);
break}},Kv:function(a){var b=this.My();if(0===arguments.length){var c=b.filter(".oj-hover");c.length||(c=b.children(".oj-hover").closest(".oj-listbox-result"));return b.get().indexOf(c[0])}a>=b.length&&(a=b.length-1);0>a&&(a=0);this.CE();b=g(b[a]);b.hasClass("oj-listbox-result-with-children")?b.children(".oj-listbox-result-label").addClass("oj-hover"):b.addClass("oj-hover");this.dn().attr("aria-activedescendant",b.find(".oj-listbox-result-label").attr("id"));this.Bta()},CE:function(){this.Qb.find(".oj-hover").removeClass("oj-hover");
this.vCa();"ojcombobox"===this.Vd&&this.dn().removeAttr("aria-activedescendant")},d$:function(a){a=g(a.target).closest(".oj-listbox-result-selectable");if(0<a.length&&!a.is(".oj-hover")){var b=this.My();this.Kv(b.index(a))}else 0==a.length&&this.CE()},zea:function(a){var b=this.Ha.find(".oj-listbox-liveregion");b.length&&b.text(a)},aF:function(a){var c=this,d=this.search.val(),e=g.data(this.Ha,this.Sa+"-last-term");if(!0===a||!e||d!==e||!0===this.ea.multiple)if(e||d||!a||"input"!==a.type)g.data(this.Ha,
this.Sa+"-last-term",d),d.length>=(this.ea.minLength||0)?(clearTimeout(this.HKa),a&&!0!==a?this.HKa=setTimeout(function(){c.Aba(a)},b.bla):this.Aba(a)):this.close()},Aba:function(a){function c(){h.TV();if(h.header&&h.hl.length){var a=h.My(),b=h.hl.length+a.length;h.hl.attr("aria-setsize",b);a.length&&(a=a.children("[role\x3d'option']"),a.attr("aria-setsize",b),a.first().attr("aria-posinset",h.hl.length+1))}}var d=this.search,e=this.Qb,f=this.ea,h=this,k;k=d.val();var w;(f.minLength||0)>k.length?this.close():
(this.open(null,!0),w=++this.uja,this.CE(),k=this.search.val(),k=void 0!==k&&null!==k&&(!0!==a||f.Sc||0<f.minLength)?k:"",this.s_=1,f.hx({element:f.element,ku:k,page:this.s_,context:null,Yt:f.Yt,Mc:this.te(function(k){if(w===this.uja&&this.df())if(this.context=k&&void 0!==k.context?k.context:null,k&&0!==k.Qb.length||!b.GGa(h.V,f.Wfa,"formatNoMatches"))b.pLa(this,k.Qb),this.xL(),this.mba(e),h.ea.BKa.call(this,e,k.Qb,{ku:d.val(),page:this.s_,context:null,iN:a},this.Eda()),this.mE(k,a),c(),this.zea(f.LHa(h.V,
k.Qb.length));else if("oj-select"===this.Sa&&!0!==this.ea.multiple||this.header){k=g("\x3cli\x3e");k.addClass("oj-listbox-no-results");var l=f.Wfa(h.V,d.val());k.text(l);this.xL();this.mba(e);e.append(k);c();this.zea(l)}else this.close()})}))},mba:function(a){this.ea.list?(a=a.children(),this.Z9(a)):a.empty()},Z9:function(a){for(var b=0;b<a.length;b++){g(a[b]).is("LI")&&((g(a[b]).hasClass("oj-listbox-no-results")||g(a[b]).hasClass("oj-listbox-placeholder"))&&g(a[b]).remove(),g(a[b]).css("display",
"none"),g(a[b]).hasClass("oj-selected")&&g(a[b]).removeClass("oj-selected"));var c=g(a[b]).children("ul");c&&c.children()&&this.Z9(c.children())}},KR:function(a){this.close(a)},Py:function(){b.Xi(this.search)},yW:function(a,c){if(this.header){var d=this.dn().attr("aria-activedescendant");if(this.P$(d)){var d=g("#"+d),e=d.find("a, input, select, textarea, button, object").first();0===e.length&&(e=d.children());e.length&&e[0].click();this.close(c);return}}d=this.Kv();(e=this.Qb.find(".oj-hover").closest(".oj-listbox-result").data(this.Vd))?
(this.Kv(d),a=a||{},a.trigger=b.Ox.Nla,this.hE(e,a,c),this.ZE(e,a,c),c&&"keydown"===c.type&&(this.Nfa=!0)):a&&a.qKa&&this.close(c)},Ns:function(){return this.ea.element.attr("placeholder")||this.ea.element.attr("data-placeholder")||this.ea.element.data("placeholder")||this.ea.placeholder},cp:function(){var a=this.Ns();a&&(this.search.attr("placeholder",a),this.Ha.removeClass(this.Sa+"-allowclear"))},k$:function(){var a;a:{var b,c,d;a=this.ea.element.attr("style");if(void 0!==a)for(a=a.split(";"),
c=0,d=a.length;c<d;c+=1)if(b=a[c].replace(/\s/g,""),b=b.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),null!==b&&1<=b.length){a=b[1];break a}a=void 0}null!==a&&this.Ha.css("width",a)},Hc:function(){return this.V.option("value")},gu:function(a,b,c){var d={Fw:!1};c&&(d._context=c);"string"===typeof a?this.V.wc([a],b,d):this.V.wc(a,b,d);this.ea.element.val(a)},ZE:function(){},Eda:function(){return!1},dn:function(){return this.search},fK:function(){return void 0!==this.ea.minimumResultsForSearch&&
void 0!==this.Ha.fK},Hg:function(a,b){for(var c=0;c<a.length;c++)if(g(a[c]).data(this.Vd).value===b)return a[c];return null}}),d={hY:!0,eOa:!0,Wfa:function(a){return a.F("noMatchesFound")},LHa:function(a,b){return 1===b?a.F("oneMatchesFound"):a.F("moreMatchesFound",{num:""+b})},id:function(a){return a.id},Yt:function(a,b){return 0<=(""+b).toUpperCase().indexOf((""+a).toUpperCase())},separator:","},e=b.xt(c,{Iy:function(){e.u.Iy.apply(this,arguments)&&this.search.prop("disabled",!this.Ro())},Xi:function(){this.df()&&
this.close()},_destroy:function(){g("label[for\x3d'"+this.search.attr("id")+"']").attr("for",this.ea.element.attr("id"));e.u._destroy.apply(this,arguments)},UR:function(b){this.selection.data(this.Vd)&&(b||a.t.warn("Event should not be null when user modified the value in UI"),"oj-select"===this.Sa&&this.V.lo()||this.gu([],b),this.search.val(""),this.selection.removeData(this.Vd));this.cp()},Lv:function(){this.ea.Ft.call(null,this.qp?this.qp:this.ea.element,this.te(this.Cea))},wy:function(a){if(this.Ro())if(a.which===
b.Db.PAGE_UP||a.which===b.Db.PAGE_DOWN)a.preventDefault();else{switch(a.which){case b.Db.UP:case b.Db.DOWN:this.df()?this.Kaa(a.which===b.Db.UP?-1:1):this.open(a);a.preventDefault();return;case b.Db.ENTER:this.yW(null,a);a.preventDefault();this.df()||(this.Vz=!1);return;case b.Db.TAB:this.close(a);this.Vz=!1;return;case b.Db.QO:this.df()&&(this.KR(a),a.preventDefault());this.Vz=!1;return}this.Vz=!0}},Cra:function(a){this.Ro()&&!this.df()&&this.open(a)},pK:function(){var a,c=this.Ha,d,e=(d=this.ea.rootAttributes)&&
d.id?d.id:this.ea.element.attr("id")||b.WA();this.selection=a=c.find("."+this.Sa+"-choice");a.attr("id",this.Sa+"-choice-"+e);d=g("label[for\x3d'"+this.ea.element.attr("id")+"']");d.attr("id")||d.attr("id",this.Sa+"-label-"+e);a.find("."+this.Sa+"-input").attr("id",this.Sa+"-input-"+e);this.Qb.attr("id")||this.Qb.attr("id","oj-listbox-results-"+e);c=c.find(".oj-listbox-liveregion");c.length&&c.attr("id","oj-listbox-live-"+e);"oj-select"!==this.Sa&&this.search.attr("aria-owns",this.Qb.attr("id"));
this.search.attr("aria-labelledby",d.attr("id"));this.ea.element.attr("aria-labelledby",d.attr("id"));this.search.attr("id")&&d.attr("for",this.search.attr("id"));this.ea.element.attr("aria-label")&&this.search.attr("aria-label",this.ea.element.attr("aria-label"));this.ea.element.attr("aria-controls")&&this.search.attr("aria-controls",this.ea.element.attr("aria-controls"));a.on("keydown",this.te(this.wy));a.on("mousedown","abbr",this.te(function(a){this.Ro()&&(this.UR(a),b.XJa(a),this.close(a),this.selection.focus())}));
a.on("mousedown",this.te(function(c){this.ea.element.prop("disabled")&&b.Rw(c);a.removeClass("oj-focus-highlight");this.df()?this.close(c):this.Ro()&&this.open(c);var d=this.search.parent().attr("aria-hidden");d&&"true"==d?this.selection.focus():this.search.focus();g(c.target).hasClass("oj-combobox-open-icon")&&b.Rw(c);this.Ha.addClass("oj-active")}));a.on("mouseup",this.te(function(){this.Ha.removeClass("oj-active")}));a.on("focus",this.te(function(a){b.Rw(a)}));this.search.on("input",this.te(function(a){this.V.jq(this.search.val(),
a)}));this.search.on("focus",this.te(function(){this.oba=this.search.val()}));this.search.on("blur keyup",this.te(function(a){if("keyup"!==a.type||10===a.keyCode||13===a.keyCode){if(void 0!==this.search.val()&&0>=this.Qb.find(".oj-hover").length&&("keyup"!==a.type||!this.Nfa))if(this.ea.manageNewEntry){var c=this.search.val(),d=this.ea.manageNewEntry(c),e={trigger:"blur"===a.type?b.Ox.c0:b.Ox.l0},f=this.selection.data(this.Vd);!f&&""!==c||f&&f.label!==c||!this.V.isValid()&&c!==this.oba?(this.hE(d,
e,a),"blur"!==a.type&&this.ZE(d,e,a)):this.ea.Sc&&"keyup"===a.type&&(f&&f.label===c&&(d=f),this.ZE(d,e,a))}else null==this.ea.manageNewEntry&&((d=this.selection.data(this.Vd),""==this.search.val())?this.UR(a):d||""===this.search.val()?"oj-select"!==this.Sa&&(a=this.ea.DY(d),void 0!==a&&this.search.val(a)):this.ws());this.search.removeClass(this.Sa+"-focused");this.Ha.removeClass("oj-focus");this.Nfa=!1}}));this.k$();this.ea.element.hide().attr("aria-hidden",!0);this.cp()},bt:function(){var a=e.u.bt.apply(this,
arguments),c=this,d=a.element.get(0).tagName.toLowerCase();if("input"===d&&a.element.attr("list")||"select"===d&&0<a.element.children().length||a.list){var f=a.list?"li":"option";a.Ft=function(a,b){var e,g=c.Hc();Array.isArray(g)&&(g=g[0]);void 0!==g&&null!==g&&(e=c.Zv(a.find(f).filter(function(){if("li"==f)return this.getAttribute("oj-data-value")===g;if("option"==f)return this.value===g})),"select"===d&&void 0===e&&(g=null));if(void 0===g||null===g)e=c.Zv(a.find(f).filter(function(){if("li"==f)return!0===
this.getAttribute("oj-data-selected");if("option"==f)return this.selected}));b(e)};a.validate=function(a,b){var d;void 0!==b&&null!==b&&(d=c.Zv(a.find(f).filter(function(){if("li"==f)return this.getAttribute("oj-data-value")===b;if("option"==f)return this.value===b})));return!!d}}else if("options"in a||this.Hc()&&0<this.Hc().length)g.isFunction(a.options)?a.Ft=function(d,e){function f(b,c){for(var d=0,e=b.length;d<e;d++){var g=b[d];if(c===a.id(g)||g.children&&(g=f(g.children,c)))return g}return null}
var h="";c.Hc()&&c.Hc().length&&(h=c.Hc()[0]);var k=null;if(h){var p=b.zga(c);p&&(k=f(p,h));k||(p=c.currentItem)&&p.length&&h===a.id(p[0])&&(k=p[0]);k||c.U_?e(k):a.hx({value:[h],Mc:g.isFunction(e)?function(a){a&&a.Qb&&(k=f(a.Qb,h));e(k)}:g.noop})}else e(k)}:(a.Ft=function(b,e){var f="";c.Hc()&&c.Hc().length&&(f=c.Hc()[0]);var h="select"==d&&c.V.Qu()&&!c.V.lo()?c.Ns():null,k=null;a.hx({Yt:function(b,c,d){(b=f===a.id(d))&&(k=d);null==h&&(h=d);return b},Mc:g.isFunction(e)?function(){k||"select"!==d||
(k=h);e(k)}:g.noop})},a.validate=function(b,c){var d=null;a.hx({Yt:function(b,e,f){(b=c===a.id(f))&&(d=f);return b},Mc:g.noop});return!!d});return a},mE:function(a,c,d){var e=-1,f=this;a=this.My();b.br(a,function(a,b){if(f.Hc()&&f.Hc()[0]===f.id(b.data(f.Vd)))return e=a,!1});!1!==d&&!0===c&&0<=e&&this.Kv(e)},hE:function(a,b,c){if(this.tea(a)){var d;b&&b.trigger&&(d={$t:{trigger:b.trigger}});this.close(c);this.gu(0===this.id(a).length?[]:this.id(a),c,d);"blur"!==c.type&&this.Py()}},ws:function(){this.search.val("")}}),
f=b.xt(e,{Vd:"ojcombobox",Sa:"oj-combobox",KC:function(){return g(document.createElement("div")).attr({"class":"oj-combobox oj-component"}).html("\x3cdiv class\x3d'oj-combobox-choice' tabindex\x3d'-1' role\x3d'presentation'\x3e   \x3cinput type\x3d'text' autocomplete\x3d'off' autocorrect\x3d'off' autocapitalize\x3d'off'       spellcheck\x3d'false' class\x3d'oj-combobox-input' role\x3d'combobox' aria-expanded\x3d'false' aria-autocomplete\x3d'list' /\x3e   \x3cabbr class\x3d'oj-combobox-clear-entry' role\x3d'presentation'\x3e\x3c/abbr\x3e   \x3cspan class\x3d'oj-combobox-divider' role\x3d'presentation'\x3e\x3c/span\x3e   \x3ca class\x3d'oj-combobox-arrow oj-combobox-icon oj-component-icon oj-clickable-icon-nocontext oj-combobox-open-icon'       role\x3d'button' aria-label\x3d'expand'\x3e\x3c/a\x3e\x3c/div\x3e\x3cdiv class\x3d'oj-listbox-drop' style\x3d'display:none' role\x3d'presentation'\x3e   \x3cul class\x3d'oj-listbox-results' role\x3d'listbox'\x3e   \x3c/ul\x3e\x3c/div\x3e")},
bn:function(a){f.u.bn.apply(this,arguments);this.Jy?this.Ha.find(".oj-combobox-arrow").removeClass("oj-disabled"):this.Ha.find(".oj-combobox-arrow").addClass("oj-disabled")},close:function(a){this.df()&&f.u.close.apply(this,arguments)},Yv:function(a,b){f.u.Yv.apply(this,arguments);b||this.aF(!0)},wy:function(a){b.Db.rZ(a)||b.Db.vZ(a)||f.u.wy.apply(this,arguments)},ip:function(a){var b,c=[];this.selection.data(this.Vd,a);null!==a&&0!=a.length?(b=this.ea.DY(a),void 0!==b&&this.search.val()!==b&&this.search.val(b),
this.search.removeClass(this.Sa+"-default"),c.push(a)):(this.search.val(""),this.cp());this.currentItem=c;this.ea.dGa&&this.Ha.addClass(this.Sa+"-allowclear")},Cea:function(a){if(void 0===a||null===a)a=(a=this.Hc())?Array.isArray(a)?Array.isArray(a)&&a.length?{label:a[0]}:null:{label:a}:null;this.ip(a)}}),h=b.xt(e,{Vd:"ojselect",Sa:"oj-select",Vz:!1,KC:function(){return g(document.createElement("div")).attr({"class":"oj-select oj-component"}).html("\x3cdiv class\x3d'oj-select-choice' tabindex\x3d'0' role\x3d'combobox'      aria-autocomplete\x3d'none' aria-expanded\x3d'false'\x3e  \x3cspan class\x3d'oj-select-chosen'\x3e\x3c/span\x3e  \x3cabbr class\x3d'oj-select-search-choice-close' role\x3d'presentation'\x3e\x3c/abbr\x3e  \x3ca class\x3d'oj-select-arrow oj-component-icon oj-clickable-icon-nocontext oj-select-open-icon' role\x3d'presentation'\x3e\x3c/a\x3e\x3c/div\x3e\x3cdiv class\x3d'oj-listbox-drop' style\x3d'display:none' role\x3d'dialog'\x3e  \x3cdiv class\x3d'oj-listbox-search-wrapper'\x3e  \x3cdiv class\x3d'oj-listbox-search'\x3e    \x3cinput type\x3d'text' autocomplete\x3d'off' autocorrect\x3d'off' autocapitalize\x3d'off'           spellcheck\x3d'false' class\x3d'oj-listbox-input' title\x3d'Search field'            role\x3d'combobox' aria-expanded\x3d'false' aria-autocomplete\x3d'list' /\x3e    \x3cspan class\x3d'oj-listbox-spyglass-box'\x3e      \x3cspan class\x3d'oj-component-icon oj-clickable-icon-nocontext oj-listbox-search-icon' role\x3d'presentation'\x3e       \x3cb role\x3d'presentation'\x3e\x3c/b\x3e\x3c/span\x3e    \x3c/span\x3e  \x3c/div\x3e  \x3c/div\x3e   \x3cul class\x3d'oj-listbox-results' role\x3d'listbox'\x3e   \x3c/ul\x3e\x3c/div\x3e\x3cdiv role\x3d'region' class\x3d'oj-helper-hidden-accessible oj-listbox-liveregion' aria-live\x3d'polite'\x3e\x3c/div\x3e")},
bn:function(a){h.u.bn.apply(this,arguments);this.Jy?(this.selection.attr("tabindex","0"),this.Ha.find(".oj-select-arrow").removeClass("oj-disabled")):(this.selection.attr("tabindex","-1"),this.Ha.find(".oj-select-arrow").addClass("oj-disabled"))},close:function(a){this.df()&&(h.u.close.apply(this,arguments),this.selection.attr("aria-expanded",!1).removeAttr("aria-haspopup").removeAttr("aria-owns"),this.search.attr("aria-expanded",!1).removeAttr("aria-controls"),this.dX(a)||this.ws(),a instanceof MouseEvent&&
a.target!=this.selection&&a.target!=this.search||b.Xi(this.selection),this.Ha.find(".oj-listbox-spyglass-box").off("mouseup click"))},Yv:function(a,b){h.u.Yv.apply(this,arguments);var c,d=a.which||a.keyCode;a&&"keydown"==a.type&&(32==d||47<d&&58>d||64<d&&91>d||95<d&&112>d||185<d&&193>d||218<d&&223>d)&&(c=String.fromCharCode(a.which),a.shiftKey||(c=c.toLowerCase()),a.preventDefault());this.HEa(c);b||(c?this.aF():this.aF(!0))},xL:function(){if(this.df()){var a="true"!==this.selection.attr("aria-expanded");
h.u.xL.apply(this,arguments);a&&(this.selection.attr("aria-expanded",!0).attr("aria-haspopup","dialog").attr("aria-owns",this.jd.attr("id")),this.search.attr("aria-expanded",!0).attr("aria-controls",this.Qb.attr("id")+" "+this.Ha.find(".oj-listbox-liveregion").attr("id")))}},pK:function(){var a=this.Wq+"_selected";this.text=this.Ha.find(".oj-select-chosen").attr("id",a);h.u.pK.apply(this,arguments);this.selection.attr({"aria-labelledby":this.search.attr("aria-labelledby"),"aria-describedby":a});(a=
this.ea.element.attr("aria-label"))&&this.selection.attr("aria-label",a);this.search.on("keydown",this.te(this.wy));this.search.on("keyup-change input",this.te(this.Cra));this.search.attr("title",this.V.F("searchField"));var b=this;this.selection.on("blur",function(a){b.dX(a)})},Lv:function(){this.Z$()?(this.ip(null),this.close(),this.cp()):h.u.Lv.apply(this,arguments)},Cea:function(a){if(void 0!==a&&null!==a){var b,c=this.Hc(),c=Array.isArray(c)?c[0]:c;b=this.ea.id(a);c!==b&&(void 0===c||null===
c?this.V.options.value=Array.isArray(b)?b:[b]:this.gu(Array.isArray(b)?b:[b]));this.ip(a);this.close()}},ip:function(a){this.selection.data(this.Vd,a);null!==a&&this.text.text(a.label);a&&""!=a.id&&this.text.removeClass(this.Sa+"-default");this.ea.dGa&&this.Ha.addClass(this.Sa+"-allowclear")},dn:function(){return this.search.attr("aria-expanded")&&this.fK()?this.search:this.selection},Z$:function(){if(null===this.Ns())return!1;var a=this.Hc(),a=Array.isArray(a)?a[0]:a;return""===a||void 0===a||null===
a},Ns:function(){return this.ea.placeholder},Eda:function(){return!0},cp:function(){var a=this.Ns();this.Z$()&&void 0!==a&&(void 0===a&&(a=""),this.text.text(a).addClass(this.Sa+"-default"),this.Ha.removeClass(this.Sa+"-allowclear"))},gu:function(a,b,c){h.u.gu.call(this,a,b,c);this.selection.data("selectVal",a)},wy:function(a){if(!(b.Db.rZ(a)&&a.which!=b.Db.Z0||b.Db.vZ(a))){switch(a.which){case b.Db.TAB:this.close(a);this.selection.focus();this.dX(a);return;case b.Db.ENTER:if(a.target===this.selection[0]&&
!this.df()){this.open(a);a.preventDefault();return}}h.u.wy.apply(this,arguments);this.Vz&&!this.df()&&this.open(a)}},dX:function(a){return""==this.text.text()?(this.UR(a),!0):!1},HEa:function(a){var c=!1,d=this.jd.find(".oj-listbox-search");d&&(this.fK()?(this.jd.find(".oj-listbox-search-wrapper").removeClass("oj-helper-hidden-accessible"),g(d).removeAttr("aria-hidden"),this.search.val(a),c=!0):(this.jd.find(".oj-listbox-search-wrapper").addClass("oj-helper-hidden-accessible"),g(d).attr("aria-hidden",
"true")));b.Xi(c?this.search:this.selection);if(c){var e=this;d.find(".oj-listbox-spyglass-box").on("mouseup click",function(a){e.search.focus();a.preventDefault()})}},fK:function(){var a=this.ea.minimumResultsForSearch;return(this.ea.list?g("#"+this.ea.list).find("li").length:this.qp?this.qp[0].length:this.ea.options?this.ea.options.length:0)>a||this.Vz}}),k=b.xt(c,{bt:function(){var a=k.u.bt.apply(this,arguments),c=this,d=a.element.get(0).tagName.toLowerCase();if("input"===d&&a.element.attr("list")||
"select"===d&&0<a.element.children().length||a.list){var e=a.list?"li":"option";a.Ft=function(a,f){var g=[];if(c.Hc())for(var h,k=c.Hc(),l=0;l<k.length;l++){var m=k[l];(h=a.find(e).filter(function(){if("option"===e)return this.value===m;if("li"===e)return this.getAttribute("oj-data-value")===m}))&&h.length?g.push(c.Zv(h)):g.push({value:m,label:m})}else"select"!==d&&(h=a.find(e).filter(function(){if("option"===e)return this.selected;if("li"===e)return!0===this.getAttribute("oj-data-selected")}),b.br(h,
function(a,b){g.push(c.Zv(b))}));f(g)}}else"options"in a&&(a.Ft=g.isFunction(a.options)?function(d,e){function f(){for(var b=[],d=0;d<k.length;d++){for(var g=k[d],h=!1,n=0;n<l.length;n++){var p=l[n];if(g===a.id(p)){b.push(p);l.splice(n,1);h=!0;break}}if(!h){if((n=c.currentItem)&&n.length)for(p=0;p<n.length;p++)if(g===a.id(n[p])){b.push(n[p]);h=!0;break}h||b.push({value:g,label:g})}}e(b)}function h(b,c){for(var d=[],e=0,f=b.length;e<f;e++){var k=b[e];0<=c.indexOf(a.id(k))&&d.push(k);k.children&&(k=
h(k.children,c))&&k.length&&g.merge(d,k)}return d}var k=c.Hc(),l=[],p=b.zga(c);p&&(l=h(p,k));c.U_?f():a.hx({value:k,Mc:function(a){a&&a.Qb&&(a=h(a.Qb,k))&&a.length&&g.merge(l,a);f()}})}:a.Ft||function(b,d){var e=c.Hc(),f=[];a.hx({Yt:function(b,c,d){(b=g.grep(e,function(b){return b===a.id(d)}).length)&&f.push(d);return b},Mc:g.isFunction(d)?function(){for(var b=[],c=0;c<e.length;c++){for(var g=e[c],h=!1,k=0;k<f.length;k++){var n=f[k];if(g===a.id(n)){b.push(n);f.splice(k,1);h=!0;break}}h||b.push({value:g,
label:g})}d(b)}:g.noop})});return a},Gz:function(a){var b=this.Ha.find("."+this.Sa+"-selected-choice.oj-focus");b.length&&a&&a[0]==b[0]||(b.length&&this.ea.element.trigger("choice-deselected",b),b.removeClass("oj-focus"),a&&a.length&&(this.close(),a.addClass("oj-focus"),this.Ha.find("."+this.Sa+"-description").text(a.attr("valueText")+". Press back space to delete.").attr("aria-live","assertive"),this.ea.element.trigger("choice-selected",a)))},_destroy:function(){g("label[for\x3d'"+this.search.attr("id")+
"']").attr("for",this.ea.element.attr("id"));k.u._destroy.apply(this,arguments)},pK:function(){var a="."+this.Sa+"-choices",c,d=b.WA(),e;this.v_=this.Ha.find("."+this.Sa+"-search-field");this.selection=c=this.Ha.find(a);var f=this;this.selection.on("click","."+this.Sa+"-selected-choice:not(."+this.Sa+"-locked)",function(){f.search[0].focus();f.Gz(g(this))});e=g("label[for\x3d'"+this.ea.element.attr("id")+"']");e.attr("id")||e.attr("id",this.Sa+"-label-"+d);c.find("."+this.Sa+"-input").attr("id",this.Sa+
"-input-"+d);this.Qb.attr("id")||this.Qb.attr("id","oj-listbox-results-"+d);this.search.attr("aria-owns",this.Qb.attr("id"));this.search.attr("aria-labelledby",e.attr("id"));this.ea.element.attr("aria-labelledby",e.attr("id"));this.search.attr("id")&&e.attr("for",this.search.attr("id"));this.ea.element.attr("aria-label")&&this.search.attr("aria-label",this.ea.element.attr("aria-label"));this.ea.element.attr("aria-controls")&&this.search.attr("aria-controls",this.ea.element.attr("aria-controls"));
this.search.attr("tabindex",this.rY);this.AZ=0;this.search.on("keydown",this.te(function(a){if(this.Ro()){++this.AZ;var d=c.find("."+this.Sa+"-selected-choice.oj-focus"),e=d.prev("."+this.Sa+"-selected-choice:not(."+this.Sa+"-locked)"),f=d.next("."+this.Sa+"-selected-choice:not(."+this.Sa+"-locked)"),g=b.VHa(this.search);if(!d.length||a.which!=b.Db.LEFT&&a.which!=b.Db.RIGHT&&a.which!=b.Db.LO&&a.which!=b.Db.i0&&a.which!=b.Db.ENTER)if((a.which!==b.Db.LO||1!=this.AZ)&&a.which!=b.Db.LEFT||0!=g.offset||
g.length){this.Gz(null);if(this.df())switch(a.which){case b.Db.UP:case b.Db.DOWN:this.Kaa(a.which===b.Db.UP?-1:1);a.preventDefault();return;case b.Db.ENTER:this.yW(null,a);a.preventDefault();return;case b.Db.TAB:this.close(a);return;case b.Db.QO:this.KR(a);a.preventDefault();return}if(!(a.which===b.Db.TAB||b.Db.rZ(a)||b.Db.vZ(a)||a.which===b.Db.QO||a.which===b.Db.ENTER&&this.search.val()&&"ojcombobox"===this.Vd))switch(a.which){case b.Db.UP:case b.Db.DOWN:this.open();a.preventDefault();break;case b.Db.PAGE_UP:case b.Db.PAGE_DOWN:a.preventDefault();
break;case b.Db.ENTER:a.preventDefault()}}else this.Gz(c.find("."+this.Sa+"-selected-choice:not(."+this.Sa+"-locked)").last()),a.preventDefault();else g=d,a.which==b.Db.LEFT&&e.length?g=e:a.which==b.Db.RIGHT?g=f.length?f:null:a.which===b.Db.LO?(this.DX(d.first(),a),this.search.width(10),g=e.length?e:f):a.which==b.Db.i0?(this.DX(d.first(),a),this.search.width(10),g=f.length?f:null):a.which==b.Db.ENTER&&(g=null),this.Gz(g),a.preventDefault(),g&&g.length||this.open()}}));this.search.on("keyup",this.te(function(){this.AZ=
0}));this.search.on("input",this.te(function(a){this.V.jq(this.search.val(),a)}));this.search.on("blur keyup",this.te(function(a){if("keyup"!==a.type||10===a.keyCode||13===a.keyCode){if(this.ea.manageNewEntry&&this.search.val()&&0>=this.Qb.find(".oj-hover").length){var c=this.ea.manageNewEntry(this.search.val());this.hE(c,{trigger:"blur"===a.type?b.Ox.c0:b.Ox.l0},a)}this.search.removeClass(this.Sa+"-focused");this.Ha.removeClass("oj-focus");this.Gz(null);this.df()||this.ws();a.stopImmediatePropagation()}}));
this.Ha.on("click touchstart",a,this.te(function(a){!this.Ro()||0<g(a.target).closest("."+this.Sa+"-selected-choice").length||(this.Gz(null),this.df()?this.close(a):(this.open(),this.Py()),a.preventDefault())}));this.Ha.on("focus",a,this.te(function(){}));this.k$();this.ea.element.hide().attr("aria-hidden",!0);this.ws()},Iy:function(){k.u.Iy.apply(this,arguments)&&this.search.prop("disabled",!this.Ro())},Lv:function(){null!==this.Hc()&&0!==this.Hc().length||"oj-select"!==this.Sa&&""!==this.ea.element.text()||
(this.ip([]),this.close(),this.ws());if(this.qp||null!==this.Hc()&&this.Hc().length){var a=this;this.ea.Ft.call(null,this.qp?this.qp:this.ea.element,function(b){void 0!==b&&null!==b&&0!==b.length&&(a.ip(b),a.close(),a.ws())})}},ws:function(){var a=this.Ns(),b=this.pva();void 0===a||this.Hc()&&0!==this.Hc().length?(this.search.attr("placeholder",""),this.search.val("").width(10),this.v_.width("auto")):(this.search.attr("placeholder",a),this.search.val("").width(0<b?b:this.Ha.css("width")),this.v_.width("100%"))},
Yv:function(a,b){this.UCa();k.u.Yv.apply(this,arguments);this.Py();b||this.aF(!0);this.search.focus()},close:function(a){this.df()&&k.u.close.apply(this,arguments)},Xi:function(){this.close();this.search.focus()},ip:function(a){var b=[],c=[],d=this;g(a).each(function(){0>b.indexOf(d.id(this))&&(b.push(d.id(this)),c.push(this))});a=c;this.selection.find("."+this.Sa+"-selected-choice").remove();g(a).each(function(){d.Dpa(this)});this.currentItem=a;this.ea.element.val(0===b.length?"":b.join(this.ea.separator));
d.mE()},hE:function(a,c,d){if(this.tea(a)){var e;c&&c.trigger&&(e={$t:{trigger:c.trigger}});var f=this.id(a),h=this.Hc()?this.Hc().slice(0):[];this.V.isValid()||(h=b.Lr(this.ea.element.val(),this.ea.separator));g(a).each(function(){0>h.indexOf(f)&&h.push(f)});this.gu(h,d,e);!this.select&&this.ea.hY||this.mE(a,!1,!0===this.ea.hY);this.ea.hY&&(this.close(d),this.search.width(10));c&&c.qKa||this.Py()}},KR:function(a){this.close(a);this.Py()},Dpa:function(a){var c=!a.locked,d=g("\x3cli class\x3d'"+this.Sa+
"-selected-choice'\x3e    \x3cdiv\x3e\x3c/div\x3e    \x3ca href\x3d'#' onclick\x3d'return false;' role\x3d'button' aria-label\x3d'remove' class\x3d'"+this.Sa+"-clear-entry       oj-component-icon oj-clickable-icon-nocontext "+this.Sa+"-clear-entry-icon' tabindex\x3d'-1'\x3e    \x3c/a\x3e\x3c/li\x3e"),e=g("\x3cli class\x3d'"+this.Sa+"-selected-choice "+this.Sa+"-locked'\x3e\x3cdiv\x3e\x3c/div\x3e\x3c/li\x3e"),d=c?d:e;this.id(a);e=this.ea.DY(a);void 0!==e&&(d.find("div").addClass(this.Sa+"-selected-choice-label").text(e),
d.find("."+this.Sa+"-clear-entry").attr("aria-label",e+" remove"),d.attr("valueText",e));if(c)d.find("."+this.Sa+"-clear-entry").on("mousedown",b.Rw).on("click dblclick",this.te(function(a){this.Ro()&&(g(a.target).closest("."+this.Sa+"-selected-choice").fadeOut("fast",this.te(function(){this.DX(g(a.target),a);this.selection.find("."+this.Sa+"-selected-choice.oj-focus").removeClass("oj-focus");this.close(a);this.Py()})).dequeue(),b.Rw(a))}));d.data(this.Vd,a);d.insertBefore(this.v_)},DX:function(a,
c){var d=this.Hc()?this.Hc().slice(0):[],e,f;a=a.closest("."+this.Sa+"-selected-choice");if(0===a.length)throw"Invalid argument: "+a+". Must be ."+this.Sa+"-selected-choice";if(e=a.data(this.Vd)){for(this.V.isValid()||(d=b.Lr(this.ea.element.val(),this.ea.separator));0<=(f=d.indexOf(this.id(e)));)d.splice(f,1),this.gu(d,c),this.select&&this.mE();a.remove()}},mE:function(){var a=this.Hc()&&(this.ea.element.val()||this.V.isValid())?this.Hc():[],c=this.Qb.find(".oj-listbox-result"),d=this.Qb.find(".oj-listbox-result-with-children"),
e=this;b.br(c,function(b,c){var d=e.id(c.data(e.Vd));a&&0<=a.indexOf(d)&&(c.addClass("oj-selected"),c.find(".oj-listbox-result-selectable").addClass("oj-selected"))});b.br(d,function(a,b){b.is(".oj-listbox-result-selectable")||0!==b.find(".oj-listbox-result-selectable:not(.oj-selected)").length||b.addClass("oj-selected")});0< !c.filter(".oj-listbox-result:not(.oj-selected)").length&&this.close()},pva:function(){return this.selection.width()-b.Tga(this.search)},aFa:function(a){var b=document.createElement("span");
a=document.createTextNode(a);b.style.display="none";b.appendChild(a);g("body").append(b);b=g("body").find("span:last").width();g("body").find("span:last").remove();return b},UCa:function(){var a,c,d,e,f=b.Tga(this.search);a=this.aFa(this.search.val())+10;c=this.search.offset().left;d=this.selection.width();e=this.selection.offset().left;c=d-(c-e)-f;c<a&&(c=d-f);40>c&&(c=d-f);0>=c&&(c=a);this.search.width(Math.floor(c))},gu:function(a,c,d){var e;e=[];"string"===typeof a&&(a=b.Lr(a,this.ea.separator));
for(var f=0;f<a.length;f++)0>e.indexOf(a[f])&&e.push(a[f]);a={Fw:!1};d&&(a._context=d);this.V.wc(e,c,a);(this.V.isValid()||0===e.length)&&this.ea.element.val(0===e.length?"":e.join(this.ea.separator));this.search.attr("aria-activedescendant",this.ea.element.attr("id"))}}),l=b.xt(k,{Vd:"ojcombobox",Sa:"oj-combobox",KC:function(){return g(document.createElement("div")).attr({"class":"oj-combobox oj-combobox-multi oj-component"}).html("\x3cul class\x3d'oj-combobox-choices'\x3e  \x3cli class\x3d'oj-combobox-search-field'\x3e\x3cspan style\x3d'display:none'\x3e\x26nbsp;\x3c/span\x3e    \x3cinput type\x3d'text' role\x3d'combobox' aria-expanded\x3d'false' aria-autocomplete\x3d'list' autocomplete\x3d'off' autocorrect\x3d'off' autocapitalize\x3d'off' spellcheck\x3d'false' class\x3d'oj-combobox-input'\x3e  \x3c/li\x3e\x3c/ul\x3e\x3cdiv class\x3d'oj-combobox-description oj-helper-hidden-accessible'/\x3e\x3cdiv class\x3d'oj-listbox-drop oj-listbox-drop-multi' style\x3d'display:none'\x3e   \x3cul class\x3d'oj-listbox-results' role\x3d'listbox'\x3e   \x3c/ul\x3e\x3c/div\x3e")}}),
m=b.xt(k,{Vd:"ojselect",Sa:"oj-select",KC:function(){return g(document.createElement("div")).attr({"class":"oj-select oj-select-multi oj-component"}).html("\x3cul class\x3d'oj-select-choices'\x3e  \x3cli class\x3d'oj-select-search-field'\x3e\x3cspan style\x3d'display:none'\x3e\x26nbsp;\x3c/span\x3e    \x3cinput type\x3d'text' role\x3d'combobox' aria-expanded\x3d'false' aria-autocomplete\x3d'list' autocomplete\x3d'off' autocorrect\x3d'off' autocapitalize\x3d'off' spellcheck\x3d'false' class\x3d'oj-listbox-input'\x3e  \x3c/li\x3e\x3c/ul\x3e\x3cdiv class\x3d'oj-select-description oj-helper-hidden-accessible'/\x3e\x3cdiv class\x3d'oj-listbox-drop oj-listbox-drop-multi' style\x3d'display:none'\x3e   \x3cul class\x3d'oj-listbox-results' role\x3d'listbox'\x3e   \x3c/ul\x3e\x3c/div\x3e")}});
a.Ra("oj.ojCombobox",g.oj.editableValue,{defaultElement:"\x3cinput\x3e",widgetEventPrefix:"oj",options:{converter:void 0,placeholder:"",list:void 0,multiple:!1,options:null,optionsKeys:null,pickerAttributes:null,optionRenderer:null,minLength:0,beforeExpand:null,rawValue:void 0},widget:function(){return this.Ld.Ha},_ComponentCreate:function(){this._super();this.ab()},Yf:function(c,d){this._super(c,d);a.Fe.Cp([{ha:"disabled",Sd:!0},{ha:"placeholder"},{ha:"required",wh:!0,Sd:!0},{ha:"title"}],d,this);
if(void 0===this.options.value)this.options.value=void 0!==this.element.attr("value")?b.Lr(this.element.val(),","):null;else{var e=this.options.value;Array.isArray(e)?e=e.slice(0):"string"===typeof e&&(e=!0===this.options.multiple?b.Lr(e,","):[e]);this.options.value=e}},ab:function(){var a={},b=this.options.multiple;a.element=this.element;a.V=this;a=g.extend(this.options,a);this.Ld=b?new l:new f;this.Ld._init(a)},_destroy:function(){this.Ld._destroy();this._super()},refresh:function(){this._super();
this.Ld._destroy();this.ab();this.QH();this.Ij("required",this.options.required)},_setOption:function(a,c,d){"value"===a&&(Array.isArray(c)?c=c.slice(0):"string"===typeof c&&(c=!0===this.options.multiple?b.Lr(c,","):[c]),this.Ld.U_=d&&d._context&&d._context.$t?d._context.$t.trigger:null);this._super(a,c,d);"options"===a&&(this.Ld.ea.options=c,this.Ld.ea=this.Ld.bt(this.Ld.ea));"disabled"===a&&(c?this.Ld.zS():this.Ld.bn())},Gj:function(){this._superApply(arguments);this.Ld.close()},Vm:function(){this._superApply(arguments);
this.Ld.close()},Hl:function(){this.Ld.Lv()},ks:function(a){this.Ld&&(this.Ld.ea.placeholder=a,this.Ld.cp&&this.Ld.cp())},validate:function(){var a=this.Ld.search.val(),b=null;!0!==this.options.multiple?b=void 0===a||null===a||""===a?[]:[a]:(b=[],this.isValid()&&(b=this.Ld.Hc()),void 0!==a&&null!==a&&""!==a&&b.push(a));return this.wc(b,null,this.hC)},RK:function(a){var c=[];"string"===typeof a&&(a=!0===this.options.multiple?b.Lr(a,","):[a]);if(Array.isArray(a))for(var d=0;d<a.length;d++){var e=this._super(a[d]);
c.push(e.toString())}return c},_GetMessagingLauncherElement:function(){return this.Ld.search},ph:function(a,b,c){a=this._GetMessagingLauncherElement();this.qh(b,c,{launcher:a})},Xf:function(){return this.Ld.search},_GetDefaultStyleClass:function(){return"oj-combobox"},lD:function(){if(this.Ld&&this.Ld.df())for(var a=g(".oj-listbox-drop"),b=0;b<a.length;b++)if("oj-listbox-drop"==g(a[b]).attr("id")&&g(a[b]).attr("data-oj-containerid")==this.Ld.Wq)return g(a[b]);return null},Hg:function(a,b){for(var c=
0;c<a.length;c++)if(g(a[c]).data("ojcombobox").value===b)return a[c];return null},getNodeBySubId:function(a){var b=null,c;if(null==a)return this.Ld.Ha?this.Ld.Ha[0]:null;b=this._super(a);if(!b){c=a.subId;"oj-combobox-drop"===c&&(c="oj-listbox-drop");"oj-combobox-results"===c&&(c="oj-listbox-results");"oj-combobox-selection"===c&&(c="oj-combobox-selected-choice");var d=this.lD();switch(c){case "oj-combobox-input":case "oj-combobox-arrow":b=this.widget().find("."+c)[0];break;case "oj-listitem":d&&(b=
d.find(".oj-listbox-result"),b=this.Hg(b,a.value));break;case "oj-combobox-remove":b=this.widget().find(".oj-combobox-selected-choice");b=(a=this.Hg(b,a.value))?g(a).find(".oj-combobox-clear-entry-icon")[0]:null;break;case "oj-listbox-drop":d&&(b=d[0]);break;case "oj-listbox-results":d&&(b=d.find("."+c)[0]);break;case "oj-combobox-selected-choice":b=this.widget().find("."+c).toArray()}}return b||null},getSubIdByNode:function(a){var b=null;null!=a&&(a=g(a),a.hasClass("oj-combobox-input")?b={subId:"oj-combobox-input"}:
a.hasClass("oj-combobox-arrow")?b={subId:"oj-combobox-arrow"}:a.hasClass("oj-listbox-result")?b={subId:"oj-listitem",value:a.data("ojcombobox").value}:a.hasClass("oj-combobox-clear-entry-icon")&&(b={subId:"oj-combobox-remove",value:a.closest(".oj-combobox-selected-choice").data("ojcombobox").value}));return b}});a.Ra("oj.ojSelect",g.oj.editableValue,{defaultElement:"\x3cselect\x3e",widgetEventPrefix:"oj",options:{minimumResultsForSearch:10,placeholder:null,list:void 0,multiple:!1,options:null,optionsKeys:null,
pickerAttributes:null,beforeExpand:null,renderMode:"jet"},widget:function(){return this.select?this.select.Ha:this.element.parent()},_ComponentCreate:function(){this._super();this.ab()},Maa:function(a){a?(this.element.attr("disabled",""),this.element.parent().addClass("oj-disabled").removeClass("oj-enabled")):(this.element.removeAttr("disabled"),this.element.parent().removeClass("oj-disabled").addClass("oj-enabled"))},CAa:function(a){var b=[],c=!this.lo()&&this.Qu();g(a.target).find("option").each(function(){this.selected&&
(this.value||c&&""===this.value)&&b.push(this.value)});this.wc(b,a,{Fw:!1,_context:{kb:!0}})},EAa:function(){var a=this.element;a.wrap("\x3cdiv\x3e").parent().addClass("oj-select-native oj-component oj-select oj-form-control");a.addClass("oj-select-select oj-component-initnode");this.options.multiple?(a[0].multiple||(a[0].multiple=!0),a.parent().prepend("\x3ca class\x3d'oj-select-arrow oj-component-icon oj-clickable-icon-nocontext oj-select-multiple-open-icon' role\x3d'presentation'\x3e\x3c/a\x3e")):
a.parent().prepend("\x3ca class\x3d'oj-select-arrow oj-component-icon oj-clickable-icon-nocontext oj-select-open-icon' role\x3d'presentation'\x3e\x3c/a\x3e");this.Maa(this.options.disabled);this.options.list?(b.ZJa(a,g("#"+this.options.list).children(),this.rv.bind(this)),a.addClass(b.sB)):this.options.options&&(b.Vea(a,this.options.options,this.rv.bind(this),this.options.optionsKeys),a.addClass(b.sB));this._focusable({element:a,applyHighlight:!0});a.change(this.CAa.bind(this))},Oza:function(){var a=
{},b=this.options.multiple;a.element=this.element;a.V=this;a=g.extend(this.options,a);this.select=b?new m:new h;this.select._init(a);this.select.Ha.addClass("oj-select-jet oj-form-control");this._focusable({element:this.select.selection,applyHighlight:!0})},ab:function(){this.Ov()?this.EAa():this.Oza()},refresh:function(){this._super();this.wo();this.ab();this.QH();this.Ij("required",this.options.required)},_destroy:function(){this.wo();this._super()},Gj:function(){this._superApply(arguments);this.select&&
this.select.close()},Vm:function(){this._superApply(arguments);this.select&&this.select.close()},ks:function(a){if(this.Ov()&&null!=a){var c=g(this.element.children("option:first-child"));c&&""===c.attr("value")?(c.text(this.options.placeholder),c.attr("value","")):(c=b.mY(0,"",a,this.rv.bind(this)),c.addClass("oj-listbox-placeholder"),this.Y9(c,this.lo()),c.prependTo(this.element))}},Qu:function(){return"string"===typeof this.options.placeholder},O1:function(){this.l3(null);this.ks(null)},Yf:function(c,
d){this._super(c,d);a.Fe.Cp([{ha:"disabled",Sd:!0},{ha:"placeholder"},{ha:"required",wh:!0,Sd:!0},{ha:"title"}],d,this);if(void 0===this.options.value)this.options.value=void 0!==this.element.attr("value")?b.Lr(this.element.val(),","):null;else{var e=this.options.value;Array.isArray(e)&&(e=e.slice(0));this.options.value=e}},validate:function(){if(!0===this.options.multiple){var a=this.select.search.val(),b=[];this.isValid()&&(b=this.select.Hc());void 0!==a&&null!==a&&""!==a&&b.push(a);return this.wc(b,
null,this.hC)}return this.select?this.wc(this.select.Hc(),null,this.hC):!0},Hl:function(a){this.select?this.select.Lv():null==a?this.Qu()?(this.element[0].selectedIndex=0,this.element.addClass("oj-select-default")):(a=this.element.children(),0<a.length&&(this.options.value=[a.first().attr("value")])):this.element.val(a)},Laa:function(){var a=this.element.children("option:not(:disabled)");return 0<a.length?[g(a[0]).attr("value")]:null},DAa:function(a){var c=this.options.value,d=this.element;if(d.hasClass(b.sB))b.jfa(d);
else{var e=d.children();0<e.length&&e.remove()}b.Vea(d,a,this.rv.bind(this),this.options.optionsKeys);d.addClass(b.sB);a=null;this.Qu()&&(this.options.required&&(a=this.Laa()),this.ks());null===a&&(a=this.Laa());this.options.value=a;this._setOption("value",c)},BCa:function(a){for(var b,c=[],d=0;d<a.length;d++)b=a[d],null!=b&&(0<b.length?(1==c.length&&""===c[0]&&c.pop(),c.push(b)):0==c.length&&c.push(b));return c},_setOption:function(a,b,c){if("value"===a)if(this.Qu()&&b&&0==b.length)this._super(a,
b,c);else{var d;this.select&&(d=this.select.qp,d||(d=this.select.ea.element));Array.isArray(b)||(b=[b]);this.Ov()&&(b=this.BCa(b),1==b.length&&""==b[0]?this.element.addClass("oj-select-default"):this.element.removeClass("oj-select-default"));for(var e=[],f=0;f<b.length;f++)this.select?(this.options.multiple||this.select.ea.validate(d,b[f]))&&e.push(b[f]):0<this.element.find("option[value\x3d'"+b[f]+"']").length&&e.push(b[f]);(0<e.length||this.options.multiple)&&this._super(a,e,c)}else"placeholder"===
a?this.select?(this.select.ea.placeholder=b,this.select.cp()):(d=this.options.value,d&&0!==d.length&&d[0]||(this.element[0].selectedIndex=0)):"minimumResultsForSearch"===a?this.select&&(this.select.ea.minimumResultsForSearch=b):"renderMode"===a&&(this.wo(),this.options.renderMode=b,this.refresh()),this._super(a,b,c),"disabled"===a?this.select?b?this.select.zS():this.select.bn():this.Maa(b):"options"===a?this.select?(this.select.ea.options=b,this.select.ea=this.select.bt(this.select.ea),this._super("value",
this.select.Hc())):this.DAa(b):"required"===a&&this.Ov()&&(a=g(this.element.find(".oj-listbox-placeholder")))&&""===a.attr("value")&&this.Y9(a,b)},lD:function(){if(this.select&&this.select.df()){var a=this.select.jd;if(a&&a.attr("data-oj-containerid")===this.select.Wq)return a}return null},Y9:function(a,b){b?(a.attr("disabled",""),a.attr("hidden","")):(a.removeAttr("disabled"),a.removeAttr("hidden"))},Ov:function(){return"native"===this.options.renderMode},wo:function(){var a=this.Ov();a&&this.element.parent().hasClass("oj-select-native")?
(this.element.off("change"),this.element.hasClass(b.sB)&&b.jfa(this.element),this.element.parent().hasClass("oj-select-native")&&(this.element.parent().children(".oj-select-arrow").remove(),this.element.unwrap()),this.element.removeClass("oj-select-select oj-component-initnode"),this.element.attr({"aria-labelledby":""})):!a&&this.select&&(this.select._destroy(),this.select=void 0)},getNodeBySubId:function(a){var b=null,c;if(null==a)return(a=this.widget())?a[0]:null;if(this.Ov())return null;b=this._super(a);
if(!b){var d=this.lD();c=a.subId;switch(c){case "oj-select-drop":d&&(b=d[0]);break;case "oj-select-results":d&&(b=d.find(".oj-listbox-results")[0]);break;case "oj-select-search":d&&(b=d.find(".oj-listbox-search")[0]);break;case "oj-select-input":case "oj-listbox-input":!0===this.options.multiple?b=this.widget().find(".oj-listbox-input")[0]:d&&(b=d.find(".oj-listbox-input")[0]);break;case "oj-select-choice":case "oj-select-chosen":case "oj-select-arrow":b=this.widget().find("."+c)[0];break;case "oj-listitem":d&&
(b=d.find(".oj-listbox-result"),b=this.select.Hg(b,a.value));break;case "oj-select-remove":b=this.widget().find(".oj-select-selected-choice");b=(a=this.select.Hg(b,a.value))?g(a).find(".oj-select-clear-entry-icon")[0]:null;break;case "oj-listbox-result-label":d&&(d=g("#"+this.select.Qb.attr("id")).children(),a=a.index,d.length&&a<d.length&&(b=d.eq(a).find("."+c)[0]))}}return b||null},getSubIdByNode:function(a){if(this.Ov())return this._super(a);var b=null;null!=a&&(a=g(a),a.hasClass("oj-listbox-input")?
b={subId:"oj-select-input"}:a.hasClass("oj-select-arrow")?b={subId:"oj-select-arrow"}:a.hasClass("oj-listbox-result")?b={subId:"oj-listitem",value:a.data("ojselect").value}:a.hasClass("oj-select-clear-entry-icon")&&(b={subId:"oj-select-remove",value:a.closest(".oj-select-selected-choice").data("ojselect").value}));return b},_GetDefaultStyleClass:function(){return"oj-select"},_GetMessagingLauncherElement:function(){return this.select?this.select.selection:this.element},Xf:function(){return this.select?
this.select.selection:this.element}});a.Components.Wn({ojSelect:{displayOptions:{converterHint:["none"]},renderMode:a.Components.Ne(function(){return(a.Wc.De("oj-select-option-defaults")||{}).renderMode})}});var r=b.xt(f,{Vd:"ojinputsearch",Sa:"oj-inputsearch",KC:function(){var a=g(document.createElement("div")).attr({"class":"oj-inputsearch oj-component"}).html("\x3cdiv class\x3d'oj-inputsearch-choice' tabindex\x3d'-1' role\x3d'presentation'\x3e   \x3cinput type\x3d'text' autocomplete\x3d'off' autocorrect\x3d'off' autocapitalize\x3d'off'       spellcheck\x3d'false' class\x3d'oj-inputsearch-input' role\x3d'combobox' aria-expanded\x3d'false' aria-autocomplete\x3d'list' /\x3e   \x3ca class\x3d'oj-inputsearch-search-button oj-inputsearch-search-icon oj-component-icon oj-clickable-icon-nocontext'       role\x3d'button' aria-label\x3d'search'\x3e\x3c/a\x3e\x3c/div\x3e\x3cdiv class\x3d'oj-listbox-drop' style\x3d'display:none' role\x3d'presentation'\x3e   \x3cul class\x3d'oj-listbox-results' role\x3d'listbox'\x3e   \x3c/ul\x3e\x3c/div\x3e"),
b=a.find(".oj-inputsearch-search-button");this.gqa(b);return a},gqa:function(a){var c=this;a.on("click",function(a){if(c.Ro()){if(c.ea.manageNewEntry){var d=c.search.val(),e=c.ea.manageNewEntry(d),f={trigger:b.Ox.Sla},g=c.selection.data(c.Vd);!g&&""!==d||g&&g.label!==d||!c.V.isValid()&&d!==c.oba?c.hE(e,f,a):g&&g.label===d&&(e=g);c.ZE(e,f,a)}return!1}}).on("mousedown",function(a){a.stopPropagation();return!1})},bn:function(a){r.u.bn.apply(this,arguments);this.Jy?this.Ha.find(".oj-inputsearch-search-button").removeClass("oj-disabled"):
this.Ha.find(".oj-inputsearch-search-button").addClass("oj-disabled")},ZE:function(a,b,c){var d;b&&(d=b.trigger);b={_context:{$t:{trigger:d}}};a=0===this.id(a).length?[]:this.id(a);void 0!==this.V.XQ(a,c,b)&&this.V.isValid()&&("string"===typeof a&&(a=[a]),this.V._trigger("update",c,{value:a,optionMetadata:{trigger:d}}))}});a.Ra("oj.ojInputSearch",g.oj.editableValue,{defaultElement:"\x3cinput\x3e",widgetEventPrefix:"oj",options:{placeholder:void 0,list:void 0,options:null,optionsKeys:null,pickerAttributes:null,
optionRenderer:null,minLength:0,beforeExpand:null,rawValue:void 0,optionChange:null,update:null},widget:function(){return this.Sc.Ha},_ComponentCreate:function(){this._super();this.ab()},Yf:function(c,d){this._super(c,d);a.Fe.Cp([{ha:"disabled",Sd:!0},{ha:"placeholder"},{ha:"required",wh:!0,Sd:!0},{ha:"title"}],d,this);if(void 0===this.options.value)this.options.value=void 0!==this.element.attr("value")?b.Lr(this.element.val(),","):null;else{var e=this.options.value;Array.isArray(e)?e=e.slice(0):
"string"===typeof e&&(e=[e]);this.options.value=e}},ab:function(){var a={};a.element=this.element;a.V=this;a.Sc=!0;a=g.extend(this.options,a);this.Sc=new r;this.Sc._init(a)},_destroy:function(){this.Sc._destroy();this._super()},refresh:function(){this._super();this.Sc._destroy();this.ab();this.QH();this.Ij("required",this.options.required)},_setOption:function(b,c,d){"value"===b&&(Array.isArray(c)?c=c.slice(0):"string"===typeof c?c=[c]:a.t.error("ojInputSearch value has to be an array of string or a string."),
this.Sc.U_=d&&d._context&&d._context.$t?d._context.$t.trigger:null);this._super(b,c,d);"options"===b&&(this.Sc.ea.options=c,this.Sc.ea=this.Sc.bt(this.Sc.ea));"disabled"===b&&(c?this.Sc.zS():this.Sc.bn())},Gj:function(){this._superApply(arguments);this.Sc.close()},Vm:function(){this._superApply(arguments);this.Sc.close()},Hl:function(){this.Sc.Lv()},ks:function(a){this.Sc&&(this.Sc.ea.placeholder=a,this.Sc.cp&&this.Sc.cp())},validate:function(){var a=this.Sc.search.val(),b=null,b=[];this.isValid()&&
(b=this.Sc.Hc());b=void 0===a||null===a||""===a?b:[a];return this.wc(b,null,this.hC)},RK:function(b){var c=[];if(Array.isArray(b))for(var d=0;d<b.length;d++){var e=this._super(b[d]);c.push(e.toString())}else"string"===typeof b?(e=this._super(b),c.push(e.toString())):a.t.error("ojInputSearch value has to be an array of string or a string.");return c},_GetMessagingLauncherElement:function(){return this.Sc.search},Xf:function(){return this.Sc.search},_GetDefaultStyleClass:function(){return"oj-inputsearch"},
lD:function(){if(this.Sc&&this.Sc.df())for(var a=g(".oj-listbox-drop"),b=0;b<a.length;b++)if("oj-listbox-drop"==g(a[b]).attr("id")&&g(a[b]).attr("data-oj-containerid")==this.Sc.Wq)return g(a[b]);return null},expand:function(){this.Sc.open()},collapse:function(){this.Sc.close()},getNodeBySubId:function(a){var b=null,c;if(null===a)return this.Sc.Ha?this.Sc.Ha[0]:null;b=this._super(a);if(!b)switch(c=a.subId,"oj-inputsearch-search"===c&&(c="oj-inputsearch-search-button"),c){case "oj-inputsearch-input":case "oj-inputsearch-search-button":b=
this.widget().find("."+c)[0];break;case "oj-listitem":if(c=this.lD())b=c.find(".oj-listbox-result"),b=this.Sc.Hg(b,a.value)}return b||null},getSubIdByNode:function(a){var b=null;null!=a&&(a=g(a),a.hasClass("oj-inputsearch-input")?b={subId:"oj-inputsearch-input"}:a.hasClass("oj-inputsearch-search-button")?b={subId:"oj-inputsearch-search"}:a.hasClass("oj-listbox-result")&&(b={subId:"oj-listitem",value:a.data("ojinputsearch").value}));return b}});a.Components.Xa("ojCombobox","editableValue",{properties:{converter:{type:"Object"},
list:{type:"string"},minLength:{type:"number"},multiple:{type:"boolean"},optionRenderer:{},options:{type:"Array"},optionsKeys:{type:"Object"},pickerAttributes:{type:"Object"},placeholder:{type:"string"},rawValue:{type:"string",readOnly:!0,writeback:!0},value:{type:"string|Array",writeback:!0}},methods:{getNodeBySubId:{},getSubIdByNode:{},refresh:{},validate:{},widget:{}},extension:{_hasWrapper:!0,_innerElement:"input",_widgetName:"ojCombobox"}});a.Components.register("oj-combobox",a.Components.getMetadata("ojCombobox"));
a.Components.Xa("ojInputSearch","editableValue",{properties:{list:{type:"string"},minLength:{type:"number"},optionRenderer:{},options:{type:"Array"},optionsKeys:{type:"Object"},pickerAttributes:{type:"Object"},placeholder:{type:"string"},rawValue:{type:"string",readOnly:!0,writeback:!0},value:{type:"string|Array",writeback:!0}},methods:{getNodeBySubId:{},collapse:{},expand:{},getSubIdByNode:{},refresh:{},validate:{},widget:{}},extension:{_hasWrapper:!0,_innerElement:"input",_widgetName:"ojInputSearch"}});
a.Components.register("oj-input-search",a.Components.getMetadata("ojInputSearch"));a.Components.Xa("ojSelect","editableValue",{properties:{list:{type:"string"},minimumResultsForSearch:{type:"number"},multiple:{type:"boolean"},options:{type:"Array"},optionsKeys:{type:"Object"},pickerAttributes:{type:"Object"},placeholder:{type:"string"},renderMode:{type:"string"},value:{type:"Array",writeback:!0}},methods:{getNodeBySubId:{},getSubIdByNode:{},refresh:{},validate:{},widget:{}},extension:{_hasWrapper:!0,
_innerElement:"select",_widgetName:"ojSelect"}});a.Components.register("oj-select",a.Components.getMetadata("ojSelect"))});